Date Function

Date functions allow you to work with any of the date capabilities related to various time steps in a project (Year, Month, Day). You can also use "Date Result" functions shown at the bottom of this section. “Date functions” can be accessed in the function editor under Functions tab. “Date Result” functions can be accessed under the Asset tab.

Click image to expand or minimize. 

Date Function Listing

@AssetStartDayStep()

Returns the number of days offset between the asset start and the project start, no maximum.

@CanProducedStepEnded() Returns 1 if any asset’s “Can Produce” scheduled step has ended, 0 if not

@CurrentMonthIndex()

Returns the Current Index of the Current Month from the Project Start Date. Same as @Step ()

@CurrentDayIndex()

Returns the Current Index of the Current Day from the Project Start Date.

@CurrentDate()

Returns the Current Date as a double within the calculation. Daily dates during daily period, Monthly dates afterwards.

@CurrentIndex()

Returns the Current Index within the calculation. Daily Index during daily period, Monthly index afterwards. CAUTION this index switches from daily to monthly

@Date(year.month,day)

Returns the Date constructed from the input values

@DateFromIndex(index)

Returns the Date corresponding to the Project Start Date + Index Months.

@DateToIndex(date)

Converts a Date to the Index from the Project Start Date.

@Day([date])

Returns the Day of the Date Entered, or if no argument is entered then for the current step date.

@DaysInMonth([Index])

Days in the Current Monthly Time Step or the Specified Index from the Project Start Date

@DayStep()

Returns the current Zero Based Daily Step. Returns # of days to the month start if after Project start if past the end of the daily calculations.

@MOnthStep()

Returns the Current Index of the Current Month from the Project Start Date. Same as @Step() when not in daily mode.

@ProjectEndDate()

Returns the Project End Date for this Calculation (Start Date + Calc Length)

@ProjectStartDate([Months Added])

Returns the Project Start Date. Optionally Adds the number of months provided.

@LastStep()

Returns the Current Monthly Index minus 1 from the Project Start Date. Minimum value of 0.

@MaxStep()

Returns the Index (zero based) of the final time step of the calculations. (i.e. 10 years = 119)

@Step()

Returns the Current Index of the Current Month from the Project Start Date or the Current Day index is in the Daily Calculation Mode. Consider using @MonthStep() for monthly data requirements.

@YEAR(date)

Returns the Year of the Date Entered, or if no argument is entered then for the current step date.

@HistoryUnitlDate()

Returns the the Scenario Level Setting for how much history to use. Returns a date at the end of the month.

@LastHistoryDate()

Returns the Date of the last well production history data. Monthly data will return a date at the end of month.

Date Results Function Listing

@ActivityStartStep(Activity Type Name or Index)

Returns the Starting step index (0 based). Returns -1 if no activity data exists for the entered Activity Type (name or 0 based index)

@ActivityStartDate(Activity Type Name or Index)

Returns the Starting Step Date (Excel Date, Days from 1900). Returns 0 if no activity data exists for the entered Activity Type (name or 0 based index)

@AssetStartDate{[Months Added]}

Returns the Asset Start Date. Optionally Adds the number of months provided.

@AssetStartStep()

Returns the Asset Start Step (0 based from project start month)

@CompDays([Asset Name], [Index])

The number of Days spent Completing the current well (or optionally entered well name) in all steps until the well can produce. Optionally enter a step index for reporting arrays. (Each Drilling Step can set this Category).

@DrillDays([Asset Name], [Index])

The number of Days spent Drilling the current well (or optionally entered well name) in all steps until the well can produce.  Optionally enter a step index for reporting arrays. (Each Drilling Step can set this Category)."

@DrillStartDate( )

The Date on which the Well is started Drilling (Only Valid for Auto Drilled Wells, otherwise returns Asset Start Date)

@DoneProduction()

Returns 1 if the asset is finished production, 0 if not. 

@EconLimit([Asset Name])

Returns 1 if the asset has reached its economic limit, 0 if not. Optionally enter an Asset Name.

@EconLimitStep()

Returns 0 if the asset has passed its economic limit or if there is no economic limit, otherwise returns the number of months until it hits its economic limit.

@EconLimitStepDaily()

Returns 0 if the asset has passed its economic limit or if there is no economic limit, otherwise returns the number of days until it hits its economic limit.

@FirstProductionDate()

Returns the Date of first production if it has occurred, or the End Of Calc Date + 1 month. WARNING. this value will not be set for Capital Dates and Constraints until after the first calculation and should not be used in such.

@FirstProductionIndex()

Returns the Index of first production if it has occurred, or Project Time Steps + 1 month. WARNING. this value will not be set for Capital Dates and Constraints until after the first calculation and should not be used in such.

@IsExcluded()

Returns 1 if the asset is excluded from calculations, 0 if not.

@HasProduced()

Returns 1 if the asset has produced, 0 if not.

@IsAutoAdded()

Returns 1 if the asset is auto added from the scheduler, 0 if not.

@ShutInDaysOfLast()

The number of Days the last Shut In Event lasted. Triggered by Halo Distance Restrictions etc.

@ShutInEvent()

Returns the current amount of shut in events on an asset, with overlapping shut in events counted as one.

@ShutInDaysSinceLast()

The number of Days since the last Shut in Event ended. Triggered by Halo Distance Restrictions etc.

@ShutInHaloLevelOfLast()

The Halo number (1,2,3) of the last distance Shut In Event that occurred. Zero returned for non-halo events.